//
//  LYSearchBar.m
//  artist
//
//  Created by Jay_Apple on 16/5/11.
//  Copyright © 2016年 viviyoo. All rights reserved.
//

#import "LYSearchBar.h"

@implementation LYSearchBar

- (instancetype)initWithFrame:(CGRect)frame{

    if (self = [super initWithFrame:frame]) {
        [self setUpComponents];
    }
    return self;
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder{

    if (self = [super initWithCoder:aDecoder]) {
        [self setUpComponents];
    }
    
    return self;

}

- (void)setUpComponents{

    self.frame = CGRectMake(0, 0, CGFLOAT_MAX, 30);
    self.borderStyle = UITextBorderStyleRoundedRect;
    UIImageView *leftView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"搜索-black"]];
    leftView.My_Width = 30;
    leftView.My_Height = 30;
    leftView.contentMode = UIViewContentModeCenter;
    self.leftView = leftView;
    self.leftViewMode = UITextFieldViewModeAlways;
    self.font = [UIFont systemFontOfSize:14];

}


@end
